/*
 * Copyright (C) 2013～2023 上海颐凡软件科技有限公司
 * Yfann Software Technology (Shanghai) Co.,LTD
 * All Rights Reserved.
 * 公司网址: www.yfann.com
 * 365IT教育网，成就您优秀架构师之梦！
 * 平台网址: www.365itedu.com
 */
package com.yfann.web.base.sys.service;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.yfann.sword.web.fwk.Service;
import com.yfann.sword.web.fwk.consts.FrameworkConst;

/**
 * 安全退出页面处理类。
 * 
 * <pre>
 * 修改履历
 * -----------------------------------------------------------------------------
 *         VERSION       DATE            BY       CHANGE/COMMENT
 * -----------------------------------------------------------------------------
 *          1.0         2013/10/11      颜廷吉            create
 * -----------------------------------------------------------------------------
 * </pre>
 */
public class SYS0201S01LogoutService implements Service {

    /**
     * 期待处理返回结果
     */
    private static final String EXCEPT_EVENT = "logoutSuccess";

    /**
     * 业务逻辑执行。
     * @return String
     */
    @Override
    public String executeService() {
        ActionContext actionContext = ActionContext.getContext();
        Map<String, Object> sessionMap = actionContext.getSession();
        sessionMap.remove(FrameworkConst.USER_INFO_OBJECT_KEY);

        return EXCEPT_EVENT;
    }
}
